|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.actions.ContributionItemFactory
Access to standard contribution items provided by the workbench.
Most of the functionality of this class is provided by static methods and fields. Example usage:
MenuManager menu = ...; IContributionItem reEdit = ContributionItemFactory.REOPEN_EDITORS.create(window); menu.add(reEdit);
Clients may declare subclasses that provide additional application-specific contribution item factories.
Field Summary | |
static ContributionItemFactory |
OPEN_WINDOWS
Workbench contribution item (id "openWindows"): A list of windows currently open in the workbench. |
static ContributionItemFactory |
PERSPECTIVES_SHORTLIST
Workbench contribution item (id "perspectivesShortlist"): A list of perspectives available to be opened, arranged as a shortlist of promising perspectives and an "Other" subitem. |
static ContributionItemFactory |
PIN_EDITOR
Workbench action (id "pinEditor"): Toggle whether the editor is pinned. |
static ContributionItemFactory |
REOPEN_EDITORS
Workbench contribution item (id "reopenEditors"): A list of recent editors (with inputs) available to be reopened in the window. |
static ContributionItemFactory |
VIEWS_SHORTLIST
Workbench contribution item (id "viewsShortlist"): A list of views available to be opened in the window, arranged as a shortlist of promising views and an "Other" subitem. |
static ContributionItemFactory |
VIEWS_SHOW_IN
Workbench contribution item (id "viewsShowIn"): A list of views available to be opened in the window, arranged as a list of alternate views to show the same item currently selected. |
Constructor Summary | |
protected |
ContributionItemFactory(String contributionItemId)
Creates a new workbench contribution item factory with the given id. |
Method Summary | |
abstract IContributionItem |
create(IWorkbenchWindow window)
Creates a new standard contribution item for the given workbench window. |
String |
getId()
Returns the id of this contribution item factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final ContributionItemFactory PIN_EDITOR
public static final ContributionItemFactory OPEN_WINDOWS
public static final ContributionItemFactory VIEWS_SHORTLIST
public static final ContributionItemFactory VIEWS_SHOW_IN
public static final ContributionItemFactory REOPEN_EDITORS
public static final ContributionItemFactory PERSPECTIVES_SHORTLIST
Constructor Detail |
protected ContributionItemFactory(String contributionItemId)
contributionItemId
- the id of contribution items created by this factoryMethod Detail |
public abstract IContributionItem create(IWorkbenchWindow window)
A typical contribution item automatically registers listeners against the
workbench window so that it can keep its enablement state up to date.
Ordinarily, the window's references to these listeners will be dropped
automatically when the window closes. However, if the client needs to get
rid of a contribution item while the window is still open, the client must
call dispose
to give the item an
opportunity to deregister its listeners and to perform any other cleanup.
window
- the workbench window
public String getId()
|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |